home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / os2tools / bnklysrc / com.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-05-05  |  2.2 KB  |  103 lines

  1. /*PLF Sat  05-06-1989  02:37:05
  2.  
  3. com.h is so different in the two os's that I have decided to make
  4. two speparte include files-- com_dos.h and com_os2.h. This file
  5. defines some common stuff, then decides which of those two to
  6. suck in.
  7.  
  8. */
  9.  
  10.  
  11. #ifdef NEVER
  12. #define COM1            0
  13. #define COM2            1
  14. #define COM1_BASE       0x3f8
  15. #define COM2_BASE       0x2f8
  16. #define COM1_IMR          0x10
  17. #define COM2_IMR          0x08
  18. #define PASS_THRU_PORT  0x238
  19. #define BAUD_150        0x020
  20. #define BAUD_600        0x060
  21. #define DELTA_CTS            0x01
  22. #define DELTA_DSR            0x02
  23. #define TRAIL_EDGE_RI    0x04
  24. #define DELTA_CD            0x08
  25. #define CTS                    0x10 /* Bits for the Modem Status Register... */
  26. #define DSR                    0x20
  27. #define RI                    0x40
  28. #define DCD                    0x80    /* <--- some cheap modems use 0x20 for this */
  29. #endif
  30.  
  31.  
  32.  
  33. #define BITS_7          0x02
  34. #define BITS_8          0x03
  35. #define STOP_1             0x00
  36. #define STOP_2             0x04
  37. #define ODD_PARITY      0x08
  38. #define EVEN_PARITY     0x18
  39. #define NO_PARITY       0x00
  40. #define BAUD_300        0x040
  41. #define BAUD_1200       0x080
  42. #define BAUD_2400       0x0A0
  43. #define BAUD_4800       0x0C0
  44. #define BAUD_9600       0x0E0
  45. #define BAUD_19200      0x000
  46. #define BAUD_38400      0x020
  47.  
  48. /* Bit definitions for the Line Status Register */
  49.  
  50. #define DATA_READY         0x0100
  51. #define OVERRUN_ERR         0x0200
  52. #define PARITY_ERR         0x0400
  53. #define FRAMING_ERR         0x0800
  54. #define BREAK_INT             0x1000
  55. #define TX_HOLD_EMPTY     0x2000
  56. #define TX_SHIFT_EMPTY    0x4000
  57.  
  58. /* Bit definitions for the driver flags */
  59.  
  60. #define USE_XON            0x01
  61. #define USE_CTS            0x02
  62. #define USE_DSR            0x04
  63. #define OTHER_XON            0x08
  64.  
  65. #define BRK             0x01
  66. #define MDM             0x02
  67.  
  68. struct CONTROL
  69.     {
  70.     int carrier_mask;
  71.     int handshake_mask;
  72.     };
  73.  
  74. struct baud_str {
  75.     char *str;
  76.     unsigned rate;
  77.     };
  78.  
  79. extern struct pointers ctl;
  80.  
  81.  
  82. struct parse_list {
  83.         int p_length;
  84.         char *p_string;
  85.         };
  86.  
  87. struct secure {
  88.         char *rq_OKFile;
  89.         char *rq_FILES;
  90.         char *rq_About;
  91.         char *rq_Template;
  92.         char *sc_Inbound;
  93.         int rq_Limit;
  94.         };
  95.  
  96.  
  97. #ifndef OS_2
  98. #include "com_dos.h"
  99. #else
  100. #include "com_os2.h"
  101. #endif
  102.  
  103.